Skip to content

Commit 31dd0ee

Browse files
committed
Empty group name issue resolved
1 parent a0fe0d0 commit 31dd0ee

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/Http/Controllers/MessageController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ function messages(Request $request){
4242

4343
function UpdateConversation(Request $request){
4444

45+
if($request->grpname == null){
46+
return json_encode(['error' => 'Group name is empty']);
47+
}
48+
4549
// checking if user is participant of conversation also fetching conversation_id
4650
$tmp = DB::table('participants')->where(['conversation_id' => $request->group_id,'user_id' => Auth()->user()->id])->get()->toArray();
4751

resources/views/admin/master.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
</div>
7676
<p class="p-3" id="alertbody"></p>
7777
<div class="modal-footer">
78-
<button type="button" id="alert-ok" class="btn btn-secondary" data-dismiss="modal">Ok</button>
78+
<button type="button" id="alert-ok" class="btn btn-primary" data-dismiss="modal">Ok</button>
7979
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
8080
</div>
8181
</div>

0 commit comments

Comments
 (0)